home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-12 | 988 b | 36 lines | [TEXT/PJMM] |
- unit UpdateWindow;
- interface
- uses
- Globals, ReDraw;
-
- procedure UpdateWindow (awindow: WindowPtr);
-
- implementation
-
- {Update the contents of the given window}
- {############################ UpdateWindow ##########################}
-
- { This is our response to receipt of an update event for myWindow.}
- { Since the window is likely to be inactive, the current GrafPort}
- { will be elsewhere. We must change it for drawing, yet leave it}
- { as it was.}
-
- procedure UpdateWindow (awindow: WindowPtr);
- var
- saveport: GrafPtr; (* to save and restore the old port *)
- begin
- BeginUpdate(awindow); (* reset clipRgn etc to only redraw what's}
- { necessary. *)
-
- GetPort(saveport); (* don't trash the port; we might be}
- { updating an inactive window *)
- SetPort(awindow); (* work in the specified window *)
-
- DrawWindow; (* redraw contents of window *)
-
- SetPort(saveport); (* all nice and tidy as before *)
-
- EndUpdate(awindow);
-
- end; (* UpdateWindow *)
- end.